#include once "mud-gui/widgets/basewidget.bi"
#include once "mud-gui/event.bi"

#ifndef MUD_UI_UTIL_BI
#define MUD_UI_UTIL_BI -1

namespace ui

	declare function boundingBox( byval x as integer, byval y as integer, _
											byval w as integer, byval h as integer, _
											byval m_x as integer, byval m_y as integer ) _
											as integer

	declare function initScreen( byref title as string = "", byval w as integer = 320, byval h as integer = 240, _
				byval b as integer = 32, byval flags as integer = 0 ) as integer


	declare sub ShowError( byref _error_ as string )
	declare sub ConsolePrint( byref _logstr_ as string )
	declare sub LogPrint( byref _logstr_ as string, byref file_ as string = "" ) 'defaults to exename.exe.log

	declare function SendEvent overload ( byval event_ as _GUI_EVENT_ ptr ) as integer
	declare function SendEvent ( byval w as BaseWidget ptr, byval event_ as _GUI_EVENT_ ptr ) as integer

	declare function SendUserEvent overload ( byval _data as any ptr ) as integer
	declare function SendUserEvent ( byval w as BaseWidget ptr, byval _data as any ptr ) as integer

End Namespace

#endif
